using NUnit.Framework;
using Tycho.Parser.Syntax;

namespace Tycho.Parser.Tests.Syntax {
    [TestFixture]
    public class ChoiceSyntaxSpecification {
        [Test]
        public void AccumulateCapturesShouldAddAllCaptures () {
            var choice = new ChoiceSyntax (new CaptureSyntax ("a", null), new CaptureSyntax ("b", null));

            CaptureAccumulator accumulator = new CaptureAccumulator ();
            choice.AccumulateCaptures (accumulator);

            Assert.AreEqual (false, accumulator.Captures ["a"]);
            Assert.AreEqual (false, accumulator.Captures ["b"]);
        }
    }
}